package com.jrx.anytxn.param.service.product;

import com.jrx.anytxn.i18n.response.TxnPage;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.param.dto.product.PaymentSequenceTableReq;
import com.jrx.anytxn.param.dto.product.PaymentSequenceTableRes;

/**
 * @author by Administrator
 * @Classname IPaymentSequenceTable
 * @Description yf
 * @Date 2019/6/14 0014 下午 13:36
 */
public interface IPaymentSequenceTableService {

    /**
     * 根据租ID分页查询所有信息
     *
     * @param pageNum  页码
     * @param pageSize 页大小
     * @param tenantId 租户ID
     * @return com.jrx.anytxn.common.data.TxnPage<com.jrx.anytxn.param.dto.product.PaymentSequenceTableRes>
     * @author fan.yang
     * date: 2019/10/14 0014 下午 16:44
     */
    TxnPage<PaymentSequenceTableRes> findAllPageByTenId(Integer pageNum, Integer pageSize, String tenantId) throws TxnException;

    /**
     * 增加还款信息
     *
     * @param paymentSequenceTableReq 还款顺序请求实体
     * @return com.jrx.anytxn.param.dto.product.PaymentSequenceTableRes
     * @author fan.yang
     * date: 2019/10/14 0014 下午 15:58
     */
    PaymentSequenceTableRes addPaymentSequenceTable(PaymentSequenceTableReq paymentSequenceTableReq) throws TxnException;

    /**
     * 修改还款信息
     *
     * @param paymentSequenceTableReq 还款顺序请求实体
     * @return com.jrx.anytxn.param.dto.product.PaymentSequenceTableRes
     * @author fan.yang
     * date: 2019/10/14 0014 下午 16:21
     */
    PaymentSequenceTableRes modifyPaymentSequenceTable(PaymentSequenceTableReq paymentSequenceTableReq) throws TxnException;

    /**
     * 根据租户ID和还款顺序ID查询还款顺序ID，以及与还款顺序表相关的还款顺序因子表
     *
     * @param tenantId          租户ID
     * @param paymentSequenceId 还款顺序ID
     * @return com.jrx.anytxn.param.dto.product.PaymentSequenceTableRes
     * @author fan.yang
     * date: 2019/10/14 0014 下午 16:51
     */
    PaymentSequenceTableRes getByTenIdAndPaymentSequenceId(String tenantId, String paymentSequenceId);

    /**
     * 根据租户ID和还款顺序ID删除还款顺序信息及对应的还款顺序因子表的信息
     *
     * @param tenantId          租户ID
     * @param paymentSequenceId 还款顺序ID
     * @return java.lang.Boolean
     * @author fan.yang
     * date: 2019/10/14 0014 下午 16:26
     */
    Boolean removeByTenIdAndPaymentSequenceId(String tenantId, String paymentSequenceId) throws TxnException;

}
